package com.century;

import org.apache.log4j.Logger;

/**
 * Created by louis on 17-5-27.
 */
public class App {


    private static final Logger logger = Logger.getLogger(App.class);



    public static void main(String[] args)     {
        for (int i = 0; i < 1000000000; i++) {
            logger.error("Info log [" + i + "].");
            logger.debug("debug log [" + i + "].");
            if(i%2==0){
                try {
                    int result = 10/0;
                } catch (Exception e) {
                    logger.error("exception ["+i+"]. ",e);
                    logger.error("exception ["+i+"]. "+e);

                }


            }
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
